Integrand size = 15, antiderivative size = 60 \[ \int \frac {\cos ^4(x)}{a+b \cos ^2(x)} \, dx=-\frac {(2 a-b) x}{2 b^2}-\frac {a^{3/2} \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{b^2 \sqrt {a+b}}+\frac {\cos (x) \sin (x)}{2 b} \]
-1/2*(2*a-b)*x/b^2+1/2*cos(x)*sin(x)/b-a^(3/2)*arctan(cot(x)*(a+b)^(1/2)/a ^(1/2))/b^2/(a+b)^(1/2)
Time = 0.09 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.87 \[ \int \frac {\cos ^4(x)}{a+b \cos ^2(x)} \, dx=\frac {2 (-2 a+b) x+\frac {4 a^{3/2} \arctan \left (\frac {\sqrt {a} \tan (x)}{\sqrt {a+b}}\right )}{\sqrt {a+b}}+b \sin (2 x)}{4 b^2} \]
(2*(-2*a + b)*x + (4*a^(3/2)*ArcTan[(Sqrt[a]*Tan[x])/Sqrt[a + b]])/Sqrt[a + b] + b*Sin[2*x])/(4*b^2)
Time = 0.27 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.23, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 3666, 372, 397, 216, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^4(x)}{a+b \cos ^2(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (x+\frac {\pi }{2}\right )^4}{a+b \sin \left (x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 3666 |
\(\displaystyle -\int \frac {\cot ^4(x)}{\left (\cot ^2(x)+1\right )^2 \left ((a+b) \cot ^2(x)+a\right )}d\cot (x)\) |
\(\Big \downarrow \) 372 |
\(\displaystyle \frac {\cot (x)}{2 b \left (\cot ^2(x)+1\right )}-\frac {\int \frac {a-(a-b) \cot ^2(x)}{\left (\cot ^2(x)+1\right ) \left ((a+b) \cot ^2(x)+a\right )}d\cot (x)}{2 b}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle \frac {\cot (x)}{2 b \left (\cot ^2(x)+1\right )}-\frac {\frac {2 a^2 \int \frac {1}{(a+b) \cot ^2(x)+a}d\cot (x)}{b}-\frac {(2 a-b) \int \frac {1}{\cot ^2(x)+1}d\cot (x)}{b}}{2 b}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\cot (x)}{2 b \left (\cot ^2(x)+1\right )}-\frac {\frac {2 a^2 \int \frac {1}{(a+b) \cot ^2(x)+a}d\cot (x)}{b}-\frac {(2 a-b) \arctan (\cot (x))}{b}}{2 b}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\cot (x)}{2 b \left (\cot ^2(x)+1\right )}-\frac {\frac {2 a^{3/2} \arctan \left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{b \sqrt {a+b}}-\frac {(2 a-b) \arctan (\cot (x))}{b}}{2 b}\) |
-1/2*(-(((2*a - b)*ArcTan[Cot[x]])/b) + (2*a^(3/2)*ArcTan[(Sqrt[a + b]*Cot [x])/Sqrt[a]])/(b*Sqrt[a + b]))/b + Cot[x]/(2*b*(1 + Cot[x]^2))
3.1.36.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ ), x_Symbol] :> Simp[(-a)*e^3*(e*x)^(m - 3)*(a + b*x^2)^(p + 1)*((c + d*x^2 )^(q + 1)/(2*b*(b*c - a*d)*(p + 1))), x] + Simp[e^4/(2*b*(b*c - a*d)*(p + 1 )) Int[(e*x)^(m - 4)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[a*c*(m - 3) + (a*d*(m + 2*q - 1) + 2*b*c*(p + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[m, 3] && IntBinomialQ[a , b, c, d, e, m, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1 )/f Subst[Int[x^m*((a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1)) , x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] & & IntegerQ[p]
Time = 0.56 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.98
method | result | size |
default | \(\frac {a^{2} \arctan \left (\frac {a \tan \left (x \right )}{\sqrt {\left (a +b \right ) a}}\right )}{b^{2} \sqrt {\left (a +b \right ) a}}-\frac {-\frac {b \tan \left (x \right )}{2 \left (\tan ^{2}\left (x \right )+1\right )}+\frac {\left (2 a -b \right ) \arctan \left (\tan \left (x \right )\right )}{2}}{b^{2}}\) | \(59\) |
risch | \(-\frac {x a}{b^{2}}+\frac {x}{2 b}-\frac {i {\mathrm e}^{2 i x}}{8 b}+\frac {i {\mathrm e}^{-2 i x}}{8 b}+\frac {\sqrt {-\left (a +b \right ) a}\, a \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-\left (a +b \right ) a}-2 a -b}{b}\right )}{2 \left (a +b \right ) b^{2}}-\frac {\sqrt {-\left (a +b \right ) a}\, a \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-\left (a +b \right ) a}+2 a +b}{b}\right )}{2 \left (a +b \right ) b^{2}}\) | \(132\) |
a^2/b^2/((a+b)*a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/2))-1/b^2*(-1/2*b*tan (x)/(tan(x)^2+1)+1/2*(2*a-b)*arctan(tan(x)))
Time = 0.29 (sec) , antiderivative size = 213, normalized size of antiderivative = 3.55 \[ \int \frac {\cos ^4(x)}{a+b \cos ^2(x)} \, dx=\left [\frac {2 \, b \cos \left (x\right ) \sin \left (x\right ) + a \sqrt {-\frac {a}{a + b}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \, {\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (x\right )^{2} - 4 \, {\left ({\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \cos \left (x\right )^{3} - {\left (a^{2} + a b\right )} \cos \left (x\right )\right )} \sqrt {-\frac {a}{a + b}} \sin \left (x\right ) + a^{2}}{b^{2} \cos \left (x\right )^{4} + 2 \, a b \cos \left (x\right )^{2} + a^{2}}\right ) - 2 \, {\left (2 \, a - b\right )} x}{4 \, b^{2}}, \frac {b \cos \left (x\right ) \sin \left (x\right ) - a \sqrt {\frac {a}{a + b}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a\right )} \sqrt {\frac {a}{a + b}}}{2 \, a \cos \left (x\right ) \sin \left (x\right )}\right ) - {\left (2 \, a - b\right )} x}{2 \, b^{2}}\right ] \]
[1/4*(2*b*cos(x)*sin(x) + a*sqrt(-a/(a + b))*log(((8*a^2 + 8*a*b + b^2)*co s(x)^4 - 2*(4*a^2 + 3*a*b)*cos(x)^2 - 4*((2*a^2 + 3*a*b + b^2)*cos(x)^3 - (a^2 + a*b)*cos(x))*sqrt(-a/(a + b))*sin(x) + a^2)/(b^2*cos(x)^4 + 2*a*b*c os(x)^2 + a^2)) - 2*(2*a - b)*x)/b^2, 1/2*(b*cos(x)*sin(x) - a*sqrt(a/(a + b))*arctan(1/2*((2*a + b)*cos(x)^2 - a)*sqrt(a/(a + b))/(a*cos(x)*sin(x)) ) - (2*a - b)*x)/b^2]
Timed out. \[ \int \frac {\cos ^4(x)}{a+b \cos ^2(x)} \, dx=\text {Timed out} \]
Time = 0.31 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.90 \[ \int \frac {\cos ^4(x)}{a+b \cos ^2(x)} \, dx=\frac {a^{2} \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b^{2}} - \frac {{\left (2 \, a - b\right )} x}{2 \, b^{2}} + \frac {\tan \left (x\right )}{2 \, {\left (b \tan \left (x\right )^{2} + b\right )}} \]
a^2*arctan(a*tan(x)/sqrt((a + b)*a))/(sqrt((a + b)*a)*b^2) - 1/2*(2*a - b) *x/b^2 + 1/2*tan(x)/(b*tan(x)^2 + b)
Time = 0.31 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.20 \[ \int \frac {\cos ^4(x)}{a+b \cos ^2(x)} \, dx=\frac {{\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )} a^{2}}{\sqrt {a^{2} + a b} b^{2}} - \frac {{\left (2 \, a - b\right )} x}{2 \, b^{2}} + \frac {\tan \left (x\right )}{2 \, {\left (\tan \left (x\right )^{2} + 1\right )} b} \]
(pi*floor(x/pi + 1/2)*sgn(a) + arctan(a*tan(x)/sqrt(a^2 + a*b)))*a^2/(sqrt (a^2 + a*b)*b^2) - 1/2*(2*a - b)*x/b^2 + 1/2*tan(x)/((tan(x)^2 + 1)*b)
Time = 2.71 (sec) , antiderivative size = 291, normalized size of antiderivative = 4.85 \[ \int \frac {\cos ^4(x)}{a+b \cos ^2(x)} \, dx=-\frac {2\,a^2\,\mathrm {atan}\left (\frac {\sin \left (x\right )}{\cos \left (x\right )}\right )-b^2\,\mathrm {atan}\left (\frac {\sin \left (x\right )}{\cos \left (x\right )}\right )-\frac {b^2\,\sin \left (2\,x\right )}{2}+a\,b\,\mathrm {atan}\left (\frac {\sin \left (x\right )}{\cos \left (x\right )}\right )-\frac {a\,b\,\sin \left (2\,x\right )}{2}+\mathrm {atan}\left (\frac {a\,\sin \left (x\right )\,{\left (-a^4-b\,a^3\right )}^{3/2}\,8{}\mathrm {i}+b\,\sin \left (x\right )\,{\left (-a^4-b\,a^3\right )}^{3/2}\,4{}\mathrm {i}+a^5\,\sin \left (x\right )\,\sqrt {-a^4-b\,a^3}\,8{}\mathrm {i}-a^2\,b^3\,\sin \left (x\right )\,\sqrt {-a^4-b\,a^3}\,2{}\mathrm {i}+a^3\,b^2\,\sin \left (x\right )\,\sqrt {-a^4-b\,a^3}\,1{}\mathrm {i}+a\,b^4\,\sin \left (x\right )\,\sqrt {-a^4-b\,a^3}\,1{}\mathrm {i}+a^4\,b\,\sin \left (x\right )\,\sqrt {-a^4-b\,a^3}\,12{}\mathrm {i}}{3\,\cos \left (x\right )\,a^5\,b^2+5\,\cos \left (x\right )\,a^4\,b^3+\cos \left (x\right )\,a^3\,b^4-\cos \left (x\right )\,a^2\,b^5}\right )\,\sqrt {-a^4-b\,a^3}\,2{}\mathrm {i}}{2\,b^3+2\,a\,b^2} \]
-(2*a^2*atan(sin(x)/cos(x)) - b^2*atan(sin(x)/cos(x)) + atan((a*sin(x)*(- a^3*b - a^4)^(3/2)*8i + b*sin(x)*(- a^3*b - a^4)^(3/2)*4i + a^5*sin(x)*(- a^3*b - a^4)^(1/2)*8i - a^2*b^3*sin(x)*(- a^3*b - a^4)^(1/2)*2i + a^3*b^2* sin(x)*(- a^3*b - a^4)^(1/2)*1i + a*b^4*sin(x)*(- a^3*b - a^4)^(1/2)*1i + a^4*b*sin(x)*(- a^3*b - a^4)^(1/2)*12i)/(a^3*b^4*cos(x) - a^2*b^5*cos(x) + 5*a^4*b^3*cos(x) + 3*a^5*b^2*cos(x)))*(- a^3*b - a^4)^(1/2)*2i - (b^2*sin (2*x))/2 + a*b*atan(sin(x)/cos(x)) - (a*b*sin(2*x))/2)/(2*a*b^2 + 2*b^3)